#ifndef MOTOR_H
#define MOTOR_H
#include "ti_msp_dl_config.h"

typedef enum
{
    MOTOR_FORWARD,
    MOTOR_BACKWARD,
    MOTOR_STOP,
    MOTOR_NEUTRAL,
} motor_mode_t;
typedef enum
{
    MOTOR_REAR = 0x00,
    MOTOR_FRONT = 0x01,
    MOTOR_RIGHT = 0x00,
    MOTOR_LEFT = 0x02,
} motor_position_t;

void motor_init(void);
/*
speed could be 0 ~ 1000
*/
void motor_set_speed(motor_position_t pos, int16_t speed);
void motor_set_mode(motor_position_t pos, motor_mode_t mode);
int32_t motor_get_encoder_cnt(motor_position_t pos);

#endif